app.service("goodsManagementService",function ($http) {
    //搜索
    this.search=function(pageNum,pageSize,searchEntity){
        return $http.post('../goodsManagementController/search.do?pageNum='+pageNum+"&pageSize="+pageSize, searchEntity);
    }
    //更新
    this.updateAuditStatus=function(ids,status){
        return $http.get('../goodsManagementController/updateAuditStatus.do?ids='+ids+'&status='+status);
    }
    //添加
    this.add=function (goodsCombine) {
        return $http.post("../goodsManagementController/add.do",goodsCombine)
    }
    //查询实体
    this.findOne=function(id){
        return $http.get('../goodsManagementController/findOne.do?id='+id);
    }
    //修改
    this.update=function(entity){
        return  $http.post('../goodsManagementController/update.do',entity );
    }
    //删除
    this.delete=function(ids){
        return $http.post('../goodsManagementController/delete.do',ids);
    }
    //上架商品
    this.putAway=function(ids){
        return $http.post('../goodsManagementController/putAway.do',ids);
    }
    //下架商品
    this.soldOut=function(ids){
        return $http.post('../goodsManagementController/soldOut.do',ids);
    }
});